cmake_minimum_required(VERSION 3.14)
project(reachSolver)

set(CMAKE_CXX_STANDARD 11)

#添加 src 子目录
add_subdirectory(src)

add_executable(test test.cpp)

#添加 lib
target_link_libraries(test dynamics)
target_link_libraries(test zonotope)

#添加外部库

#[[include(fetchcontent)      # 照写，不需要修改
 fetchcontent_declare(	spdlog	#库名字
						GIT_REPOSITORY https://gitee.com/mohistH/spdlog.git	# 仓库地址
						GIT_TAG v1.x # 库版本
						SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ext/spdlog # 指定库下载地址
						)

fetchcontent_makeavailable(spdlog)

target_link_libraries(spdlog_demo PRIVATE spdlog::spdlog)]]

#添加 eigen 库
find_package (Eigen3 REQUIRED NO_MODULE)
set(LINKING_LIBRARIES
        Eigen3::Eigen
        capd)

foreach (path $${LINKING_LIBRARIES})
    message(${path})
endforeach ()
target_link_libraries (test ${LINKING_LIBRARIES})
#没写public 看看能否全局引用
#[[
使用如下命令构建本项目：

    cmake -B build -DWOLFRAM_APPID=YAPKJY-8XT9VEYPX9 # 生成构建目录（建议更换 WOLFRAM_APPID）
    cmake --build build                              # 执行构建
    ctest --test-dir build -R "^answer."             # 运行 libanswer 测试
    ./build/answer_app                               # 运行 answer_app 程序
#]]
#good